/***********************************************************************
    filename:   DaterEventTagWindow.h
    created:    10/4/2012
    author:     4Ys

    purpose:    Defines class for EventTagWindow objects in UI
*************************************************************************/
#ifndef _DaterEventTagWindow_h_
#define _DaterEventTagWindow_h_

#include "DaterEvent.h"
#include "DaterBaseWindow.h"
#include "cegui.h"

class EventTagWindow : public BaseWindow
{
	/* !
	\brief
		The Event tag in month version of events.
	*/
public:
		/* !
		\brief
			Construct the sample of class EventTagWindow.

		\param index
			- The index of the tag.
			
		\param yPositionStart
			- The start of y position of the tag.
			
		\param yPositionEnd
			- The end of y position of the tag.
			
		\param relatedEvent
			- The event related to the tag.
			
		\param parent
			- point to parent window.
		*/
	EventTagWindow(int index, float yPositionStart, float yPositionEnd, Dater::Event* relatedEvent, CEGUI::Window* parent = 0);
	
		/* !
			Destructor of class EventTagWindow.
		*/
	~EventTagWindow();

		/* !
		\brief
			a virtual function generated from class BaseWindow to show window.
		*/
	virtual void showWindow();
	
		/* !
		\brief
			a virtual function generated from class BaseWindow to hide window.
		*/
	virtual void hideWindow();

private:		
		/* !
		\brief
			Handle the process and add brief event to the window.
			
		\param args
			- the processing program.
		*/
	bool handle_addBriefEventWindow(const CEGUI::EventArgs& args);	
	
		/* !
		\brief
			Handle the process and destroy brief event in the window.
			
		\param args
			- the processing program.
		*/
	bool handle_destroyBriefEventWindow(const CEGUI::EventArgs& args);
	
		/* !
		\brief
			Handle the process and delete event from the window.
			
		\param args
			- the processing program.
		*/
	bool handle_deleteEvent(const CEGUI::EventArgs& args);	
	
		/* !
		\brief
			Handle the process and edit event in the window.
			
		\param args
			- the processing program.
		*/
	bool handle_editEvent(const CEGUI::EventArgs& args);

		//! A map contains related group events of a certain group.
	Dater::Event* _relatedEvent;
	
		//! Represent whether the event window is attached.
	bool bEventWindowAttached;
};

#endif